package com.javaking.clanteam.studentutils.utils;

import java.util.List;

/**
 * This is a callback interface that should be implemented by any fragment that 
 * wishes to use the {@link EditableListFragment} to display a list of 
 * <code>T</code> in an embedded fragment. The {@link EditableListFragment} will
 * take care of updating the displayed list, but the parent will have to modify
 * the storage of the list as the {@link EditableListFragment} has no idea how,
 * in what format, and where the data should be stored.
 * 
 * @param <T>
 */
public interface OnItemsChangedListener<T> {

	/**
	 * Called when one or more items are added to the list.
	 * @param items A {@link List} of items to be added.
	 */
	public void onItemsAdded(List<T> items);
	
	/**
	 * Called whenever an item is removed from the list.
	 * @param item The item that is to be removed.
	 */
	public void onItemRemoved(T item);

}